<<<<<<< HEAD
#include "mybutton.h"
#include<QPixmap>
#include<QPropertyAnimation>

MyButton::MyButton(QString pix):QPushButton(0){
    QPixmap pixmap(pix);
    this->setFixedSize(pixmap.width(),pixmap.height());
    this->setStyleSheet("QPushButton{border:Opx;}");
    this->setIcon(pixmap);
    this->setIconSize(QSize(pixmap.width(),pixmap.height()));

}
void MyButton::zoomup(){
    QPropertyAnimation *button_ainmition=new QPropertyAnimation(this,"geometry");
    button_ainmition->setDuration(300);//300ms
    button_ainmition->setStartValue(QRect(this->x(),this->y(),this->width(),this->height()));
    button_ainmition->setEndValue(QRect(this->x(),this->y()+10,this->width(),this->height()));
    button_ainmition->setEasingCurve(QEasingCurve::OutBounce);
    button_ainmition->start();
}

void MyButton::zoomdown(){
    QPropertyAnimation *button_ainmition=new QPropertyAnimation(this,"geometry");
    button_ainmition->setDuration(300);//300ms
    button_ainmition->setStartValue(QRect(this->x(),this->y()+10,this->width(),this->height()));
    button_ainmition->setEndValue(QRect(this->x(),this->y(),this->width(),this->height()));
    button_ainmition->setEasingCurve(QEasingCurve::OutBounce);
    button_ainmition->start();
}
=======
#include "mybutton.h"
#include<QPixmap>
#include<QPropertyAnimation>

MyButton::MyButton(QString pix):QPushButton(0){
    QPixmap pixmap(pix);
    this->setFixedSize(pixmap.width(),pixmap.height());
    this->setStyleSheet("QPushButton{border:Opx;}");
    this->setIcon(pixmap);
    this->setIconSize(QSize(pixmap.width(),pixmap.height()));

}
void MyButton::zoomup(){
    QPropertyAnimation *button_ainmition=new QPropertyAnimation(this,"geometry");
    button_ainmition->setDuration(300);//300ms
    button_ainmition->setStartValue(QRect(this->x(),this->y(),this->width(),this->height()));
    button_ainmition->setEndValue(QRect(this->x(),this->y()+10,this->width(),this->height()));
    button_ainmition->setEasingCurve(QEasingCurve::OutBounce);
    button_ainmition->start();
}

void MyButton::zoomdown(){
    QPropertyAnimation *button_ainmition=new QPropertyAnimation(this,"geometry");
    button_ainmition->setDuration(300);//300ms
    button_ainmition->setStartValue(QRect(this->x(),this->y()+10,this->width(),this->height()));
    button_ainmition->setEndValue(QRect(this->x(),this->y(),this->width(),this->height()));
    button_ainmition->setEasingCurve(QEasingCurve::OutBounce);
    button_ainmition->start();
}
>>>>>>> 199f3fb0e9bc83f97607ce663cfb658435caaa4f
